<template>
  <div class="selector">
    <van-cell-group title="基础展示" inset>
      <van-cell
        title="地区选择"
        arrow-direction="right"
        icon="location-o"
        :value="selectorVal"
        @click="onSelectorArea"
      />
    </van-cell-group>
    <xrk-selector v-model="selectorVisible" @submit="submit"></xrk-selector>
  </div>
</template>
<script>
import xrkSelector from "../components/XrkAreaSelector/index.vue";
export default {
  name: "selector-test",
  components: {
    xrkSelector,
  },
  data() {
    return {
      selectorVal: "请选择",
      selectorVisible: false,
    };
  },
  methods: {
    onSelectorArea() {
      this.selectorVisible = !this.selectorVisible;
    },
    submit(data){
      this.selectorVal = data.cityName
    }
  },
};
</script>
<style lang="scss" scoped>
</style>